package com.honeyms.project.blog.blogcontent.domain;

import java.util.Date;

import com.honeyms.framework.aspectj.lang.annotation.Excel;
import com.honeyms.framework.web.domain.BaseEntity;
import com.honeyms.project.blog.blogcontentdetail.domain.BlogContentDetail;

public class BlogContenAndDetail  extends BaseEntity
{
    private static final long serialVersionUID = 1L;
	
	//帖子表
	private BlogContent blogContent;
	
	//帖子详情
	private BlogContentDetail blogContentDetail;
	
	/** 帖子`id */
    private Long contentId;

    /** 标题 */
    @Excel(name = "标题")
    private String title;

    /** 内容 */
    @Excel(name = "内容")
    private String content;

    /** 类型 */
    @Excel(name = "类型")
    private Integer type;

    /** 标签 */
    @Excel(name = "标签")
    private Integer tags;

    /** 类别 */
    @Excel(name = "类别")
    private String categories;

    /** 是否上热门 */
    @Excel(name = "是否上热门")
    private Integer ishot;

    /** 创建人id */
    @Excel(name = "创建人id")
    private Long createdId;

    /** 作者账号 */
    @Excel(name = "作者账号")
    private String author;

    /** 最近修改人id */
    @Excel(name = "最近修改人id")
    private Long editId;

    /** 开启评论 */
    @Excel(name = "开启评论")
    private Integer allowComment;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    /** 创建时间 */
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createDate;

    /** 修改时间 */
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date editDate;

    /** 是否为工具 */
    @Excel(name = "是否为工具")
    private Integer istool;
    
    /** 评论数量 */
    @Excel(name = "评论数量")
    private Long commentsNum;
    
    /** 点击量 */
    @Excel(name = "点击量")
    private Long views;

    /** 点赞数 */
    @Excel(name = "点赞数")
    private Long zan;

    /** 收藏数 */
    @Excel(name = "收藏数")
    private Long favorites;

    
    
	public Long getContentId() {
		return contentId;
	}

	public String getTitle() {
		return title;
	}

	public String getContent() {
		return content;
	}

	public Integer getType() {
		return type;
	}

	public Integer getTags() {
		return tags;
	}

	public String getCategories() {
		return categories;
	}

	public Integer getIshot() {
		return ishot;
	}

	public Long getCreatedId() {
		return createdId;
	}

	public String getAuthor() {
		return author;
	}

	public Long getEditId() {
		return editId;
	}

	public Integer getAllowComment() {
		return allowComment;
	}

	public Integer getStatus() {
		return status;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public Date getEditDate() {
		return editDate;
	}

	public Integer getIstool() {
		return istool;
	}

	public Long getCommentsNum() {
		return commentsNum;
	}

	public Long getViews() {
		return views;
	}

	public Long getZan() {
		return zan;
	}

	public Long getFavorites() {
		return favorites;
	}

	public void setContentId(Long contentId) {
		this.contentId = contentId;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public void setTags(Integer tags) {
		this.tags = tags;
	}

	public void setCategories(String categories) {
		this.categories = categories;
	}

	public void setIshot(Integer ishot) {
		this.ishot = ishot;
	}

	public void setCreatedId(Long createdId) {
		this.createdId = createdId;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public void setEditId(Long editId) {
		this.editId = editId;
	}

	public void setAllowComment(Integer allowComment) {
		this.allowComment = allowComment;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public void setEditDate(Date editDate) {
		this.editDate = editDate;
	}

	public void setIstool(Integer istool) {
		this.istool = istool;
	}

	public void setCommentsNum(Long commentsNum) {
		this.commentsNum = commentsNum;
	}

	public void setViews(Long views) {
		this.views = views;
	}

	public void setZan(Long zan) {
		this.zan = zan;
	}

	public void setFavorites(Long favorites) {
		this.favorites = favorites;
	}

	public BlogContent getBlogContent() {
		return blogContent;
	}

	public BlogContentDetail getBlogContentDetail() {
		return blogContentDetail;
	}

	public void setBlogContent(BlogContent blogContent) {
		this.contentId=blogContent.getContentId();
		this.title=blogContent.getTitle();
		this.content=blogContent.getContent();
		this.type=blogContent.getType();
		this.tags=blogContent.getTags();
		this.categories=blogContent.getCategories();
		this.ishot=blogContent.getIshot();
		this.createdId=blogContent.getCreatedId();
		this.author=blogContent.getAuthor();
		this.editId=blogContent.getEditId();
		this.allowComment=blogContent.getAllowComment();
		this.status=blogContent.getStatus();
		this.createDate=blogContent.getCreateDate();
		this.editDate=blogContent.getEditDate();
		this.istool=blogContent.getIstool();
		this.blogContent = blogContent;
	}

	public void setBlogContentDetail(BlogContentDetail blogContentDetail) {
		this.contentId=blogContentDetail.getContentId();
		this.title=blogContentDetail.getTitle();
		this.commentsNum=blogContentDetail.getCommentsNum();
		this.createdId=blogContentDetail.getCreatedId();
		this.editId=blogContentDetail.getEditId();
		this.createDate=blogContentDetail.getCreateDate();
		this.editDate=blogContentDetail.getEditDate();
		this.views=blogContentDetail.getViews();
		this.zan=blogContentDetail.getZan();
		this.favorites=blogContentDetail.getFavorites();
		this.blogContentDetail = blogContentDetail;
	}

	@Override
	public String toString() {
		return "{\"blogContent\":\"" + blogContent + "\", \"blogContentDetail\":\"" + blogContentDetail
				+ "\", \"contentId\":\"" + contentId + "\", \"title\":\"" + title + "\", \"content\":\"" + content
				+ "\", \"type\":\"" + type + "\", \"tags\":\"" + tags + "\", \"categories\":\"" + categories
				+ "\", \"ishot\":\"" + ishot + "\", \"createdId\":\"" + createdId + "\", \"author\":\"" + author
				+ "\", \"editId\":\"" + editId + "\", \"allowComment\":\"" + allowComment + "\", \"status\":\"" + status
				+ "\", \"createDate\":\"" + createDate + "\", \"editDate\":\"" + editDate + "\", \"istool\":\"" + istool
				+ "\", \"commentsNum\":\"" + commentsNum + "\", \"views\":\"" + views + "\", \"zan\":\"" + zan
				+ "\", \"collection\":\"" + favorites + "\"}";
	}

}
